﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 工单管理基础输入参数
/// </summary>
public class ticketsBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 类型
    /// </summary>
    [Dict("work _order _type", AllowNullValue=true)]
    public virtual string? ticketstype { get; set; }
    
    /// <summary>
    /// 产品主数据
    /// </summary>
    public virtual long? masterId { get; set; }
    
    /// <summary>
    /// 产线
    /// </summary>
    public virtual long? productionId { get; set; }
    
    /// <summary>
    /// 数量
    /// </summary>
    public virtual int? quantity { get; set; }
    
    /// <summary>
    /// 计划开始时间
    /// </summary>
    public virtual DateTime? planstarttime { get; set; }
    
    /// <summary>
    /// 计划结束时间
    /// </summary>
    public virtual DateTime? planEndtime { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public virtual string? remark { get; set; }
    
    /// <summary>
    /// 是否允许跳工序
    /// </summary>
    public virtual bool? skipornot { get; set; }
    
    /// <summary>
    /// 工序进度
    /// </summary>
    public virtual long? processprogress { get; set; }
    
    /// <summary>
    /// 编码
    /// </summary>
    public virtual string encode { get; set; }
    
}

/// <summary>
/// 工单管理分页查询输入参数
/// </summary>
public class PageticketsInput : BasePageInput
{
    /// <summary>
    /// 类型
    /// </summary>
    [Dict("work _order _type", AllowNullValue=true)]
    public string? ticketstype { get; set; }
    
    /// <summary>
    /// 产品主数据
    /// </summary>
    public long? masterId { get; set; }
    
    /// <summary>
    /// 产线
    /// </summary>
    public long? productionId { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    public bool? ticketsstates { get; set; }
    
    /// <summary>
    /// 数量
    /// </summary>
    public int? quantity { get; set; }
    
    /// <summary>
    /// 已完成数量
    /// </summary>
    public int? completedquantity { get; set; }
    
    /// <summary>
    /// 进度
    /// </summary>
    public string? progress { get; set; }
    
    /// <summary>
    /// 计划开始时间范围
    /// </summary>
     public DateTime?[] planstarttimeRange { get; set; }
    
    /// <summary>
    /// 计划结束时间范围
    /// </summary>
     public DateTime?[] planEndtimeRange { get; set; }
    
    /// <summary>
    /// 实际开始时间范围
    /// </summary>
     public DateTime?[] actualstarttimeRange { get; set; }
    
    /// <summary>
    /// 实际结束时间范围
    /// </summary>
     public DateTime?[] actualendtimeRange { get; set; }
    
    /// <summary>
    /// 投入数量
    /// </summary>
    public int? inputquantity { get; set; }
    
    /// <summary>
    /// 良品数量
    /// </summary>
    public int? goodproductquantity { get; set; }
    
    /// <summary>
    /// 报废数量
    /// </summary>
    public int? scrapquantity { get; set; }
    
    /// <summary>
    /// 来源
    /// </summary>
    public string? source { get; set; }
    
    /// <summary>
    /// 源工单号
    /// </summary>
    public string? sourceticketnumber { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public string? remark { get; set; }
    
    /// <summary>
    /// 是否允许跳工序
    /// </summary>
    public bool? skipornot { get; set; }
    
    /// <summary>
    /// 工序进度
    /// </summary>
    public long? processprogress { get; set; }
    
    /// <summary>
    /// 编码
    /// </summary>
    public string encode { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 工单管理增加输入参数
/// </summary>
public class AddticketsInput
{
    /// <summary>
    /// 类型
    /// </summary>
    [Dict("work _order _type", AllowNullValue=true)]
    [MaxLength(32, ErrorMessage = "类型字符长度不能超过32")]
    public string? ticketstype { get; set; }
    
    /// <summary>
    /// 产品主数据
    /// </summary>
    public long? masterId { get; set; }
    
    /// <summary>
    /// 产线
    /// </summary>
    public long? productionId { get; set; }
    
    /// <summary>
    /// 数量
    /// </summary>
    public int? quantity { get; set; }
    
    /// <summary>
    /// 计划开始时间
    /// </summary>
    public DateTime? planstarttime { get; set; }
    
    /// <summary>
    /// 计划结束时间
    /// </summary>
    public DateTime? planEndtime { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(32, ErrorMessage = "备注字符长度不能超过32")]
    public string? remark { get; set; }
    
    /// <summary>
    /// 是否允许跳工序
    /// </summary>
    public bool? skipornot { get; set; }
    
    /// <summary>
    /// 工序进度
    /// </summary>
    public long? processprogress { get; set; }
    
    /// <summary>
    /// 编码
    /// </summary>
    [MaxLength(100, ErrorMessage = "编码字符长度不能超过100")]
    public string encode { get; set; }
    
}

/// <summary>
/// 工单管理删除输入参数
/// </summary>
public class DeleteticketsInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 工单管理更新输入参数
/// </summary>
public class UpdateticketsInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 类型
    /// </summary>    
    [Dict("work _order _type", AllowNullValue=true)]
    [MaxLength(32, ErrorMessage = "类型字符长度不能超过32")]
    public string? ticketstype { get; set; }
    
    /// <summary>
    /// 产品主数据
    /// </summary>    
    public long? masterId { get; set; }
    
    /// <summary>
    /// 产线
    /// </summary>    
    public long? productionId { get; set; }
    
    /// <summary>
    /// 数量
    /// </summary>    
    public int? quantity { get; set; }
    
    /// <summary>
    /// 计划开始时间
    /// </summary>    
    public DateTime? planstarttime { get; set; }
    
    /// <summary>
    /// 计划结束时间
    /// </summary>    
    public DateTime? planEndtime { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>    
    [MaxLength(32, ErrorMessage = "备注字符长度不能超过32")]
    public string? remark { get; set; }
    
    /// <summary>
    /// 是否允许跳工序
    /// </summary>    
    public bool? skipornot { get; set; }
    
    /// <summary>
    /// 工序进度
    /// </summary>    
    public long? processprogress { get; set; }
    
    /// <summary>
    /// 编码
    /// </summary>    
    [MaxLength(100, ErrorMessage = "编码字符长度不能超过100")]
    public string encode { get; set; }
    
}

/// <summary>
/// 工单管理主键查询输入参数
/// </summary>
public class QueryByIdticketsInput : DeleteticketsInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataticketsInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 工单管理数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportticketsInput : BaseImportInput
{
    /// <summary>
    /// 类型 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public string? ticketstype { get; set; }
    
    /// <summary>
    /// 类型 文本
    /// </summary>
    [Dict("work _order _type")]
    [ImporterHeader(Name = "类型")]
    [ExporterHeader("类型", Format = "", Width = 25, IsBold = true)]
    public string ticketstypeDictLabel { get; set; }
    
    /// <summary>
    /// 产品主数据 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? masterId { get; set; }
    
    /// <summary>
    /// 产品主数据 文本
    /// </summary>
    [ImporterHeader(Name = "产品主数据")]
    [ExporterHeader("产品主数据", Format = "", Width = 25, IsBold = true)]
    public string masterFkDisplayName { get; set; }
    
    /// <summary>
    /// 产线 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? productionId { get; set; }
    
    /// <summary>
    /// 产线 文本
    /// </summary>
    [ImporterHeader(Name = "产线")]
    [ExporterHeader("产线", Format = "", Width = 25, IsBold = true)]
    public string productionFkDisplayName { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    [ImporterHeader(Name = "状态")]
    [ExporterHeader("状态", Format = "", Width = 25, IsBold = true)]
    public bool? ticketsstates { get; set; }
    
    /// <summary>
    /// 数量
    /// </summary>
    [ImporterHeader(Name = "数量")]
    [ExporterHeader("数量", Format = "", Width = 25, IsBold = true)]
    public int? quantity { get; set; }
    
    /// <summary>
    /// 已完成数量
    /// </summary>
    [ImporterHeader(Name = "已完成数量")]
    [ExporterHeader("已完成数量", Format = "", Width = 25, IsBold = true)]
    public int? completedquantity { get; set; }
    
    /// <summary>
    /// 进度
    /// </summary>
    [ImporterHeader(Name = "进度")]
    [ExporterHeader("进度", Format = "", Width = 25, IsBold = true)]
    public string? progress { get; set; }
    
    /// <summary>
    /// 计划开始时间
    /// </summary>
    [ImporterHeader(Name = "计划开始时间")]
    [ExporterHeader("计划开始时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? planstarttime { get; set; }
    
    /// <summary>
    /// 计划结束时间
    /// </summary>
    [ImporterHeader(Name = "计划结束时间")]
    [ExporterHeader("计划结束时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? planEndtime { get; set; }
    
    /// <summary>
    /// 实际开始时间
    /// </summary>
    [ImporterHeader(Name = "实际开始时间")]
    [ExporterHeader("实际开始时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? actualstarttime { get; set; }
    
    /// <summary>
    /// 实际结束时间
    /// </summary>
    [ImporterHeader(Name = "实际结束时间")]
    [ExporterHeader("实际结束时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? actualendtime { get; set; }
    
    /// <summary>
    /// 投入数量
    /// </summary>
    [ImporterHeader(Name = "投入数量")]
    [ExporterHeader("投入数量", Format = "", Width = 25, IsBold = true)]
    public int? inputquantity { get; set; }
    
    /// <summary>
    /// 良品数量
    /// </summary>
    [ImporterHeader(Name = "良品数量")]
    [ExporterHeader("良品数量", Format = "", Width = 25, IsBold = true)]
    public int? goodproductquantity { get; set; }
    
    /// <summary>
    /// 报废数量
    /// </summary>
    [ImporterHeader(Name = "报废数量")]
    [ExporterHeader("报废数量", Format = "", Width = 25, IsBold = true)]
    public int? scrapquantity { get; set; }
    
    /// <summary>
    /// 来源
    /// </summary>
    [ImporterHeader(Name = "来源")]
    [ExporterHeader("来源", Format = "", Width = 25, IsBold = true)]
    public string? source { get; set; }
    
    /// <summary>
    /// 源工单号
    /// </summary>
    [ImporterHeader(Name = "源工单号")]
    [ExporterHeader("源工单号", Format = "", Width = 25, IsBold = true)]
    public string? sourceticketnumber { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [ImporterHeader(Name = "备注")]
    [ExporterHeader("备注", Format = "", Width = 25, IsBold = true)]
    public string? remark { get; set; }
    
    /// <summary>
    /// 是否允许跳工序
    /// </summary>
    [ImporterHeader(Name = "是否允许跳工序")]
    [ExporterHeader("是否允许跳工序", Format = "", Width = 25, IsBold = true)]
    public bool? skipornot { get; set; }
    
    /// <summary>
    /// 工序进度 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? processprogress { get; set; }
    
    /// <summary>
    /// 工序进度 文本
    /// </summary>
    [ImporterHeader(Name = "工序进度")]
    [ExporterHeader("工序进度", Format = "", Width = 25, IsBold = true)]
    public string processprogressFkDisplayName { get; set; }
    
    /// <summary>
    /// 编码
    /// </summary>
    [ImporterHeader(Name = "编码")]
    [ExporterHeader("编码", Format = "", Width = 25, IsBold = true)]
    public string encode { get; set; }
    
}
